/***********************************************
 * Title:       IbatisZKScoreDao.java
 * Description: TODO ADD DISCRIPTION TO IbatisZKScoreDao.java
 * Author:      LeiKang
 * Create Date: 2009-12-20
 * CopyRight:   CopyRight(c)@2009
 * Version:     1.0
 ***********************************************
 */

package edu.tju.classes;

import java.sql.SQLException;

import java.util.List;

import com.ibatis.sqlmap.client.SqlMapClient;

import com.younker.waf.db.IBatisConfig;

/**
 * @author LeiKang
 * 
 */
public class IbatisZKScoreDao implements IZKScoreDao
{

        protected SqlMapClient sqlMap = IBatisConfig.getSqlMapInstance();

        @SuppressWarnings("unchecked")
		public double getAvgZKScore(ZKScore zkScore) throws SQLException
        {

                double avg = 0;
                
                @SuppressWarnings("unused")
				List<ZKScore> zk = (List<ZKScore>) sqlMap.queryForObject("getZKScoreAnd", zkScore.getStudentId());

                return avg;

        }

        /* (non-Javadoc)
         * @see edu.tju.classes.IZKScoreDao#insertZKScore()
         */
        public Long insertZKScore( ZKScore zkScore ) throws SQLException
        {
                return (Long)sqlMap.insert("insertZKScore", zkScore);
        }
        
}